//
//  StagePrototypeParser.h
//  airfight
//
//  Created by aaron more on 12-9-12.
//  Copyright (c) 2012年 moonriver. All rights reserved.
//

#ifndef airfight_StagePrototypeParser_h
#define airfight_StagePrototypeParser_h

#include "cocos2d.h"
#include "BaseXMLParser.h"
#include "StagePrototypes.h"
#include "Stage.h"
#include "StageEnemy.h"


USING_NS_CC;



class StagePrototypeParser : public BaseXMLParser
{
private:
    std::string startXMLElement;
    std::string endXMLElement;
    std::string currentString;
    Stage *currentStage;
    StageEnemy *currentEnemy;
    int enemyIdx;
    
public:
    StagePrototypes* prototypes;
    
public:
    StagePrototypeParser();
    virtual ~StagePrototypeParser();
    static StagePrototypeParser * formatWithXMLFile(const char *xmlFile);
    virtual void internalInit(const char* tmxFileName);
    
    virtual void startElement(void *ctx, const char *name, const char **atts);
    virtual void endElement(void *ctx, const char *name);
    virtual void textHandler(void *ctx, const char *s, int len);
    
};


#endif
